home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 266_01 / plotcga.c < prev    next >
C/C++ Source or Header  |  1990-04-25  |  1KB  |  29 lines

  1. /* MicroPLOX plot routine
  2.    copyright Robert L. Patton, Jr. 15 Apr 1990
  3.    A device driver for CGA high resolution monochrome graphics.
  4.    The coordinates are ajusted to fill the screen without trying
  5.    to match the original aspect ratio exactly.
  6.    This does give a quick way to get a preview image on the screen
  7.    although text may not be exactly aligned as it would be on a
  8.    printed image.
  9.       WITH PIXLIB                              File: PLOTCGA.C
  10. */
  11. #include <stdio.h>
  12. #include <stdlib.h>
  13. #include <conio.h>
  14. #include <graph.h>
  15. #include "PLOX.H"
  16. /* -------------------------------------------------------- */
  17. #define DX(A) (A*5)/4 /* adjust x coordinate to fill screen */
  18. #define DY(B) (B*5)/9 /* adjust y coordinate to fill screen */
  19. #define NORMAL  1  /* default white */
  20. #define TVON    _setvideomode(_HRESBW)
  21. /* -------------------------------------------------------- */
  22. #define TVOFF    _setvideomode(_DEFAULTMODE)
  23. #define YMAXDY   DY(YMAX)
  24. #define DOT(A,B) _setpixel((A),(YMAXDY-B))
  25. #define NODOT(A,B) {Color=_setcolor(0); \
  26.                    _setpixel((A),(YMAXDY-B));_setcolor(Color);}
  27. #define NEWHUE(A)
  28. #include "monitor.c"
  29.